require __dirname + '/../config/globals'
mongoose = require 'mongoose'
mongoose.connect 'mongodb://localhost/languagelive'
models = require __dirname + '/../app/models'

models.School.update { si: 'lhs' }, { $pull: { sl: { la: 'jp' } } }

#models.School.find {}, (err, docs) ->
  #console.log docs
  #doc = docs[0]
  #doc.sl.push { la: 'jp', cl: ['101', '201', '301'] }
  #doc.save ->
    #console.log "Saved!"
  #console.log doc

models.School.find {}, (err, docs) ->
  console.log docs